package org.kepler.chat.api.controller;

import org.kepler.loan.api.service.IUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ake
 * <p>
 * Aug 17, 2016
 */
@RestController
@RequestMapping(value = "/rest/permission")
public class PermissionApi extends BaseApi {
    @Resource
    protected IUserService userService;


    /*@ApiOperation(value = "权限校验", notes = "权限校验")
    @RequestMapping(value = "/verify", method = RequestMethod.GET)
    public ReturnDatas verify(HttpServletRequest request
            , @RequestParam(value = "permission", required = true) @ApiParam(value = "权限", required = true) String permission
    ) {
        ReturnDatas returnDatas = ReturnDatas.getSuccessReturnDatas();

        User user = getLoginUser(request);
        int userId = user.getId();
        boolean hashPermission = userService.hashPermission(userId, permission);

        returnDatas.setData(hashPermission);
        return returnDatas;
    }*/
}
